﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;

namespace CC98.Metro.Common
{
    public class ExecutingEventArgs : EventArgs
    {
        public ExecutingEventArgs(object parameter)
        {
            this.Parameter = parameter;
        }

        public object Parameter { get; private set; }
    }

    public class EventCommand : ICommand
    {
        public bool CanExecute(object parameter)
        {
            throw new NotImplementedException();
        }

        public event EventHandler CanExecuteChanged;

        public void Execute(object parameter)
        {
            if (this.Executing != null)
                this.Executing(this, new ExecutingEventArgs(parameter));
        }

        public event EventHandler<ExecutingEventArgs> Executing;
    }
}
